<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%--
  Created by IntelliJ IDEA.
  User: id
  Date: 2021/1/11
  Time: 10:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page  isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../util/makerAndenterGoodAndselect1.jsp"%>
<html>
<head>
    <title>successful进货页面</title>
    <style type="text/css">
        /*进货订单*/
        #center{
            width: 1288px;
            height:60px;
            position: absolute;
            top: 60px;
            left: 83px;
        }

        /*from表单*/
        .ctop{
            position: relative;
            left: 44px;
            top: 10px;
            border-radius: 10px;
            width: 1200px;
            height: 40px;
            box-sizing: border-box;
            padding-top: 5px;
            padding-left: 15px;
            border: 1px solid paleturquoise;
        }

        #tab{
            box-sizing: border-box;
            padding-left: 96px;
            width: 1288px;
            height: 300px;
            position: absolute;
            top: 115px;
            left: 2px;

        }
        .p{
            float: left;
            width: 55px;
            text-align: center;
            height: 40px;
        }
        .p:hover{
            background-color: rgb(192,192,192);
        }
    </style>

    <script type="text/javascript" src="../../../static/jquery-3.4.1.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#tab").hover(function () {
                $("#d4").hide()
                $("#xs").hide()
                $("#d3").hide()
                $("#d4").hide()
            })

        })

        /*删除*/
        function del(eid) {
            var url="${pageContext.request.contextPath}/EnterGoodOk/del?eid="+eid;
            if(confirm("您确认删除吗?")){
                location.href=url;
                return true;
            }else {
                return  false;
            }
        }



    </script>

</head>
<body>
<!--************************************************************************************************************************-->
<!--查询的文本框上半部分-->
<div id="center">
    <h1>
        ${msg}
    </h1>
    <!--上面部分的查询-->
    <div class="ctop">
        <form action="${pageContext.request.contextPath}/EnterGoodOk/findAll2">
            <!--根据订单编号查-->
            <input type="text" name="document2" placeholder="根据编号查询" style="width: 230px;border-radius: 6px;height: 1.7em;text-indent: 1em" value="${document}">
            <input type="submit" value="搜索" style="width: 90px;height: 2em;background-color: rgb(64,158,244);border-radius: 6px">
        </form>
    </div>

    <div id="tab">
        <table style="width: 1100px;height: 180px;text-align: center" border="1" >
            <tr>
                <td>物流编号</td>
                <td>关联编号</td>
                <td>业务日期</td>
                <td>供应商名称</td>
                <td>订单商品</td>
                <td>商品数量</td>
                <td>应付金额</td>
                <td>门店</td>
                <td>入仓之库</td>
                <td>操作</td>
            </tr>
            <c:forEach var="list" items="${requestScope.page.list}">
                <tr>
                    <td>${list.document}</td>
                    <td>${list.document2}</td>
                    <td>
                        <fmt:formatDate value="${list.data1}" pattern="yyyy/MM/dd"/>
                    </td>
                    <td>
                                                    <c:if test="${list.forname==1}">
                                                        大田商家
                                                    </c:if>
                                                    <c:if test="${list.forname==2}">
                                                        允乐商家
                                                    </c:if>
                    </td>
                    <td>${list.goodname}</td>
                    <td>
                    ${list.num}
                    </td>
                    <td>${list.money}</td>
                    <td>
                     <c:if test="${list.stores==1}">
                      门店1
                     </c:if>
                                                <c:if test="${stores==2}">
                                                    门店2
                                                </c:if>
                                                <c:if test="${stores==3}">
                                                    门店3
                                                </c:if>
                                            </td>
                                            <td>
                                                <c:if test="${list.rid==1}">
                                                    东仓
                                                </c:if>
                                                <c:if test="${list.rid==2}">
                                                    西仓
                                                </c:if>
                                                <c:if test="${list.rid==3}">
                                                    南仓
                                                </c:if>
                                                <c:if test="${list.rid==4}">
                                                    北仓
                                                </c:if>
                                            </td>
                    <td>
                        <a href="javascript:del(${list.eid})" title="删除订单">
                            <img src="../../../static/img/delete.png" alt="删除订单">
                        </a>
                    </td>
                </tr>
            </c:forEach>
        </table>

        <%--page--%>
        <div id="pa" style="width: 500px;height: 50px;margin-top: 30px">
            <div class="p">
                <a href="${pageContext.request.contextPath}/EnterGoodOk/findAll2?start=${page.curryPage-1}&document=${document}">上一页</a>
            </div>
            <c:forEach begin="1" end="${page.totalPae}" var="a">
                <div class="p">
                    <a href="${pageContext.request.contextPath}/EnterGoodOk/findAll2?start=${a}&document=${document}">${a}</a>
                </div>
            </c:forEach>


            <div class="p">
                <a href="${pageContext.request.contextPath}/EnterGoodOk/findAll2?start=${page.curryPage+1}&document=${document}">下一页</a>
            </div>

            <div class="p" style="width: 200px">
                <span>第${page.curryPage}/${page.totalPae}页</span>
                <span>共${page.totalCount}条记录,</span>
            </div>
        </div>
    </div>
</div>



</body>
</html>
